<?php
/**
 * Add/Updade Job Boards Popup
 * 
 * @author Xavier VILAIN
 * @package Hive\Mission\Job\Board
 * @license #hive-missions#
 * 
 */

use Fox\Generator;
use Fox\Popup\Modify;
use Fox\Html\Input;

if(!Fox\Authorization\Manager::check(Hive\Admin\Customizing::AUTH_MISSION_BOARDS)) {
	echo $xview->accessDenied(Msg(Hive::BUNDLE,Hive::ERR_ADMIN_ACCES_DENIED),null,true);
	exit;
}

$popup = new Modify(null,
					Hive\Mission\Job\Board::className(),
					array(Hive::BUNDLE,Hive::MISSION_JOB_BOARD_ADD_TITLE)
					);
$popup
	->callback(Generator::ajaxReload('contentCol'))
	->width(600)
	->block()
	->add(new Input(array('jobboard_label','label'),true))->parentObject()
	->add(new Input(array('jobboard_url','url'),true)
	);
echo $popup->display();